﻿// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
String[] list= File.ReadAllLines("db\\mysql-8.0.28-winx64\\my1.ini");
string currentDirectory = Environment.CurrentDirectory;
currentDirectory =currentDirectory.Replace("\\", "\\\\");
for (int i=0;i< list.Length;i++) {
    if (list[i].StartsWith("basedir")) {
        list[i] = "basedir=" + currentDirectory + "\\\\db\\\\mysql-8.0.28-winx64";
    }

    if (list[i].StartsWith("datadir")) {
        list[i] = "datadir=" + currentDirectory + "\\\\db\\\\mysql-8.0.28-winx64\\\\data";
    }

}
File.WriteAllLines("db\\mysql-8.0.28-winx64\\my.ini", list);
